---
title: Realtime Database
sidebar_label: Overview
---

##  What does it do?

The Firebase Realtime Database is a cloud-hosted database. Data is stored as JSON and
synchronized in realtime to every connected client. When you build cross-platform apps Flutter & Firebase,
all of your clients can share one Realtime Database instance and automatically receive updates with the newest data.

<YouTube id="U5aeM5dvUpA"/>

## Installation

<Tabs
groupId="legacy-or-nullsafe"
defaultValue="legacy"
values={[
    { label: "Legacy", value: "legacy" },
    { label: "Null safety", value: "null-safe" },
]}
>
<TabItem value="legacy">
</TabItem>
<TabItem value="null-safe">

:::caution
This package version is not null safe migrated yet, but has been implemented to be compatible with other null safe FlutterFire packages.
:::

Ensure you're using the Flutter `stable` channel:

```bash
$ flutter channel stable
```

If your app is mixing legacy and null-safe packages, use the `--no-sound-null-safety` flag:
```bash
$ flutter run --no-sound-null-safety
```

For legacy package imports, place the following ignore comment to hide Dart analyzer warnings:

```dart
// ignore: import_of_legacy_library_into_null_safe
import 'package:firebase_database/firebase_database.dart';
```
</TabItem>
</Tabs>

### 1. Add dependency

<Tabs
  groupId="legacy-or-nullsafe"
  defaultValue="legacy"
  values={[
    { label: "Legacy", value: "legacy" },
    { label: "Null safety", value: "null-safe" },
  ]}
>
<TabItem value="legacy">

```yaml {5} title="pubspec.yaml"
dependencies:
  flutter:
    sdk: flutter
  firebase_core: "^{{ plugins.firebase_core }}"
  firebase_database: "^{{ plugins.firebase_database }}"
```

</TabItem>
<TabItem value="null-safe">

```yaml {5} title="pubspec.yaml"
dependencies:
  flutter:
    sdk: flutter
  firebase_core: "^{{ plugins.firebase_core_ns }}"
  firebase_database: "^{{ plugins.firebase_database_ns }}"
```

</TabItem>
</Tabs> 




### 2. Download dependency

```
$ flutter pub get
```

### 3. (Web Only) Add the SDK

> Web is currently not supported. See the [FlutterFire roadmap](https://github.com/FirebaseExtended/flutterfire/issues/2582).

### 4. Rebuild your app

Once complete, rebuild your Flutter application:

```bash
$ flutter run
```

## Next Steps

Once installed, you're ready to start using Realtime Database in your Flutter Project.

> Additional documentation will be available once the Realtime Database plugin update lands as part of the [FlutterFire roadmap](https://github.com/FirebaseExtended/flutterfire/issues/2582).

<!-- View the [Usage documentation](usage.mdx) to get started. -->
